/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.posplus.losspreventiondataimporter.service;

import com.posplus.lossprevention.APDAOFactory;
import com.posplus.lossprevention.dao.StoresDAO;
import com.posplus.lossprevention.mapping.Stores;
import java.util.List;

/**
 *
 * @author scottw
 */
public class StoresService {
    private StoresDAO storesDAO;
    
    public StoresService(StoresDAO storesDAO){
        this.storesDAO = storesDAO;
    }
    
    public StoresService(APDAOFactory lpFactory){
        this.storesDAO = lpFactory.getStoresDAO();
    }
    
    public List<Stores> getAll(){
        return storesDAO.findAll();
    }

    public Stores getByStoreCode(String string) {
        return storesDAO.findByStoreCode(string);
    }
}
